package com.wf.model.enums;

/**
 * @author shuaidongdong
 */

public enum TaskCommentTypeEnum {
    /**
     * 备注类型
     */
    AGREE("agree", "同意"),
    REJECT("reject", "驳回"),
    WITHDRAW("withdraw", "撤回"),
    INQUIRY("inquiry", "意见征询"),
    START("start","发起");

    private String type;
    private String description;

    TaskCommentTypeEnum(String type, String description) {
        this.type = type;
        this.description = description;
    }

    public String getType() {
        return type;
    }

    public static String getDescByType(String type) {
        if (type != null && !"".equals(type)) {
            for (TaskCommentTypeEnum taskCommentTypeEnum : values()) {
                if (taskCommentTypeEnum.type.equals(type)) {
                    return taskCommentTypeEnum.description;
                }
            }
        }

        return null;
    }

}
